package com.xinhe.web.controller;

import com.xinhe.web.entity.AdapaySettleAccount;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

@RestController
@RequestMapping(value = "/adapaySettleAccount")
@Api(value = "adapay结算账户", tags = "adapay结算账户")
public class AdapaySettleAccountController {
    /*@Autowired
    private IAdapaySettleAccountService adapaySettleAccountService;

    @ApiOperation(httpMethod = "GET", value = "分页查询adapay结算账户")
    @RequestMapping({"/pageAdapaySettleAccount"})
    public PageResult<AdapaySettleAccountView> pageAdapaySettleAccount(AdapaySettleAccountQuery query) {
        return this.adapaySettleAccountService.pageAdapaySettleAccount(query);
    }











    @ApiOperation(httpMethod = "POST", value = "保存adapay结算账户")
    @RequestMapping({"/saveAdapaySettleAccount"})
    public BaseResult saveAdapaySettleAccount(@Valid AdapaySettleAccountModel model, BindingResult bind) {
        if (bind.hasErrors()) {
            BaseResult result = new BaseResult();
            result.setBindingResult(bind);
            return result;
        }
        return (BaseResult)this.adapaySettleAccountService.saveModel((IdModel)model);
    }











    @ApiOperation(httpMethod = "GET", value = "删除adapay结算账户")
    @ApiImplicitParam(name = "adapaySettleAccountId", value = "标识", dataTypeClass = Long.class, required = true)
    @RequestMapping({"/deleteAdapaySettleAccount"})
    public BaseResult deleteAdapaySettleAccount(Long adapaySettleAccountId) {
        return this.adapaySettleAccountService.delete(adapaySettleAccountId);
    }











    @ApiOperation(httpMethod = "GET", value = "adapay结算账户详情")
    @ApiImplicitParam(name = "adapaySettleAccountId", value = "标识", dataTypeClass = Long.class, required = true)
    @RequestMapping({"/detailAdapaySettleAccount"})
    public BeanResult<AdapaySettleAccount> detailAdapaySettleAccount(Long adapaySettleAccountId) {
        return this.adapaySettleAccountService.findById(adapaySettleAccountId);
    }*/

}